import request from '@/utils/request'

// 获取权限列表
export function fetchPermissionList(params) {
  return request({
    url: '/sys/permission',
    method: 'GET',
    params
  })
}

// 新增权限点
export function fetchAddPermission(data) {
  return request({
    url: '/sys/permission',
    method: 'POST',
    data

  })
}

// 获取权限点
export function fetchEditPermission(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'GET'

  })
}

// 修改权限点
export function fetchUpdatePermission(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'PUT',
    data

  })
}

// 删除权限详情点
export function fetchDelPermission(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'DELETE'

  })
}
